package entity

import (
	_ "github.com/go-sql-driver/mysql"
)

type Hot struct {
	HotWord        string `db:"hotword" json:"hotWord"`
	Type           string `db:"type" json:"type"`
	Tag            string `db:"tag" json:"tag"`
	Times          int    `db:"times" json:"times"`
	FirstTimeStick int64  `db:"first_timestick" json:"firstTimeStick"`
	LastTimeStick  int64  `db:"last_timestick" json:"lastTimeStick"`
	TopOrder       int    `db:"top_order" json:"topOrder"`
	BottomOrder    int    `db:"bottom_order" json:"bottomOrder"`
}

func (h Hot) TableName() string {
	return "hot_info"
}

// FengHuangHot 凤凰热搜数据库实体
type FengHuangHot struct {
	Id         string `json:"id" gorm:"column=id;primaryKey"`
	Title      string `json:"title" gorm:"column=title"`
	Source     string `json:"source" gorm:"column=source"`
	Word       string `json:"word" gorm:"column=word"`
	FirstTime  int64  `json:"firstTime" gorm:"column=first_time"`
	LastTime   int64  `json:"lastTime" gorm:"column=last_time"`
	TopRank    int    `json:"topRank" gorm:"column=top_rank"`
	BottomRank int    `json:"bottomRank" gorm:"column=bottom_rank"`
	Times      int    `json:"times" gorm:"column=times"`
}

func (f *FengHuangHot) TableName() string {
	return "fenghuang"
}

// BaiduHot 百度热搜数据库实体
type BaiduHot struct {
	Word       string `json:"word" gorm:"column=word;primaryKey"`
	Desc       string `json:"desc" gorm:"column=desc"`
	HotScore   int64  `json:"hotScore" gorm:"column=hot_score"`
	FirstTime  int64  `json:"firstTime" gorm:"column=first_time"`
	LastTime   int64  `json:"lastTime" gorm:"column=last_time"`
	TopRank    int    `json:"topRank" gorm:"column=top_rank"`
	BottomRank int    `json:"bottomRank" gorm:"column=bottom_rank"`
	Times      int    `json:"times" gorm:"column=times"`
}

func (b *BaiduHot) TableName() string {
	return "baidu"
}

// BiliHot BiliBili热搜
type BiliHot struct {
	Id         int    `json:"id" gorm:"column=id;primaryKey"`
	Word       string `json:"word" gorm:"column=word"`
	FirstTime  int64  `json:"firstTime" gorm:"column=first_time"`
	LastTime   int64  `json:"lastTime" gorm:"column=last_time"`
	TopRank    int    `json:"topRank" gorm:"column=top_rank"`
	BottomRank int    `json:"bottomRank" gorm:"column=bottom_rank"`
	Times      int    `json:"times" gorm:"column=times"`
}

func (b BiliHot) TableName() string {
	return "bili"
}
